import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";

// https://vite.dev/config/
export default defineConfig({
  plugins: [vue()],
  // 打包配置
  build: {
    lib: {
      entry: "src/packages/vue3move/index.ts", // 设置入口文件
      name: "vue3move", // 起个名字，安装、引入用
      fileName: (format) => `vue3move.${format}.js`, // 打包后的文件名
    },
    sourcemap: true,
  },
  esbuild: {
    jsxFactory: "h",
    jsxFragment: "Fragment",
    jsxInject: "import { h } from 'vue';",
  },
});
